package com.ybwh.springboot2.sharding4.ext.kengen;

import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;

import java.util.Properties;

/**
 * <p>
 *  对接滴滴的tinyid生成器
 * </p>
 *
 * @author fanbeibei
 * @version 1.0.0
 * @date 2023/4/12 14:46
 */
public class TinyidKeyGenerator implements ShardingKeyGenerator {

    @Getter
    @Setter
    private Properties properties = new Properties();

    @Override
    public Comparable<?> generateKey() {

        // 这里写 对接滴滴的tinyid  的逻辑，返回 生成的id

        return null;
    }

    @Override
    public String getType() {
        return "Tinyid";
    }


}
